/**
 * @file script.js
 * @author Alejandro Dario Simi
 * @date $Date: 2014-05-04 01:33:52 +0000 (Sun, 04 May 2014) $
 *
 * $Id: script.js 111 2014-05-04 01:33:52Z daemonraco@gmail.com $
 * $URL: http://wcomix.googlecode.com/svn/trunk/extensions/AutoTagger/script.js $
 */

if (typeof Skoll != "undefined") {
	Skoll.actions.autotagger = {
		//
		// Protected variables.
		//
		// Public methods.
		//
		// Protected methods.
		_binds: function() {
			$(".AutoTaggerTooltip").on("click", function(event) {
				Skoll.tools.preventDefault(event);

				var link = $(event.target);
				var position = link.position();

				console.log(position.left, position.top, link.height());
				Skoll.tools.ToolTips.setPostion(position.left, position.top + link.height());
				Skoll.tools.ToolTips.openFromUrl(link.attr("href"));
			});
		}
	};
	$(document).ready(function() {
		Skoll.actions.autotagger._binds();
	});
}